catching

inline fun <R> catching(block: () -> R): KmmResult<R>(source)

Non-fatal-only-catching version of stdlib's runCatching, directly returning a KmmResult- Re-throws any fatal exceptions, such as OutOfMemoryError. Relies on Arrow's nonFatalOrThrow internally.